<?php
/**
 * +--------------------------------------------------------------
 * | eLuoPHP
 * +--------------------------------------------------------------
 * | Copyright (c) 2016-2019 http://qxwoo.cn All rights reserved.
 * +--------------------------------------------------------------
 * | y139w [y139w@163.com]
 * +--------------------------------------------------------------
 * | 2019/12/24 15:35 haosir
 * +--------------------------------------------------------------
 * | Image.php
 * +--------------------------------------------------------------
 */


namespace luo\response;


use luo\Response;

class Image extends Response
{

    /**
     * 页面响应内容类型
     * @var string
     */
    protected $contentType = 'image/png';

    /**
     * 处理响应内容
     * @param $data
     * @return mixed
     */
    protected function output($data){

        if(is_file($data)){
            $data = file_get_contents($data);
        }
        return $data;

    }

}